package com.yifang.yibingproject.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.util.List;

@Data
@ApiModel("员工用户编辑DTO")
public class StaffEditDTO {

    @ApiModelProperty("用户id【编辑：必填，新增：不填】")
    private Long id;

    @NotBlank
    @Length(min = 2, max = 10, message = "用户名限制2~10个字符内")
    @ApiModelProperty(value = "用户名，前端登录账号【必填】",required = true)
    private String username;

    @ApiModelProperty("用户密码（加密）【新增：必填，编辑：不填（填写则修改密码）】")
    private String password;

    @Length(min = 2, max = 10, message = "用户昵称限制2~10个字符内")
    @ApiModelProperty("用户昵称")
    private String nickname;

    @Length(min = 2, max = 10, message = "用户真实姓名限制2~10个字符内")
    @ApiModelProperty("用户真实姓名")
    private String realName;

    @ApiModelProperty("手机号")
    private String mobile;

    @ApiModelProperty("头像URL")
    private String avatar;

    @Min(0)
    @Max(2)
    @ApiModelProperty("性别：0.未知 1.男 2.女")
    private Integer gender;

    @ApiModelProperty("角色id列表")
    private List<Long> roleIdList;
}
